package com.ddlaw.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ddlaw.dao.ContractDao;
import com.ddlaw.entity.TContractType;
import com.ddlaw.entity.TLawContracts;
import com.ddlaw.service.ContractsService;
@Service
@Transactional
public class ContractsServiceImpl implements ContractsService{

	@Resource
	ContractDao contractDao;
	
	@Override
	public List<TLawContracts> getAllContracts() {
		// TODO Auto-generated method stub
		return contractDao.getAllContracts();
	}

	@Override
	public int addContracts(TLawContracts contracts) {
		// TODO Auto-generated method stub
		return contractDao.addContracts(contracts);
	}

	@Override
	public int delContractsById(int productId) {
		// TODO Auto-generated method stub
		return contractDao.delContractsById(productId);
	}

	@Override
	public List<TLawContracts> getContractsById(int contractId) {
		// TODO Auto-generated method stub
		return contractDao.getContractsById(contractId);
	}

	@Override
	public List<TContractType> getByTypeId(Integer contractid) {
		// TODO Auto-generated method stub
		return contractDao.getByTypeId(contractid);
	}

}
